package com.ruoyi.tag.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.tag.dao.IUserTagDao;
import com.ruoyi.tag.domain.TagsInfo;
import com.ruoyi.tag.mapper.TagsInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户标签Dao实现类
 *
 * @author ruoyi
 */
@Repository
public class UserTagDaoImpl extends ServiceImpl<TagsInfoMapper, TagsInfo> implements IUserTagDao {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Autowired
    private TagsInfoMapper tagsInfoMapper;

    /**
     * 根据用户ID查询用户信息
     *
     * @param userId 用户ID
     * @return 用户信息
     */
    @Override
    public SysUser selectUserById(Long userId) {
        return sysUserMapper.selectUserById(userId);
    }

    /**
     * 查询标签信息列表
     *
     * @param tagsInfo 标签信息
     * @return 标签信息集合
     */
    @Override
    public List<TagsInfo> selectTagsInfoList(TagsInfo tagsInfo) {
        return tagsInfoMapper.selectTagsInfoList(tagsInfo);
    }
}